package com.tlgen.orm.controller;

import com.tlgen.orm.domain.SysDept;
import com.tlgen.orm.common.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dept")
public class SysDeptController {

    @GetMapping("/tree")
    public List<SysDept> tree() {
        return Model.tree(SysDept.class);
    }

}
